﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SiteLayout.Master" AutoEventWireup="true" CodeBehind="carview.aspx.cs" Inherits="carportal.carview" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" src="js/uCarausel.js"></script>

  <script type="text/javascript">
   
      $(document).ready(function () {
          document.body.id = "page2";
      }); 
	</script>  
         <script type="text/javascript">
             $(document).ready(function () {
                 $('.slider')._TMS({
                     show: 0,
                     pauseOnHover: false,
                     duration: 700,
                     preset: 'simpleFade',
                     pagination: $('.img-pags').uCarausel({//'.pags',//,true,'<ul></ul>'
                         show: 3
			, shift: 2,
                         buttonClass: 'but'
                     }),
                     pagNums: false,
                     slideshow: false,
                     numStatus: false,
                     banners: 'fade', // fromLeft, fromRight, fromTop, fromBottom
                     waitBannerAnimation: false
                 })
             })
	</script>
<script type="text/javascript">
    function changeimg($newimg) {
       $('#mianpic').css('background-image', "url('"+ $newimg +"')");
       return false;
}
</script>
</asp:Content>
 <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
     <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:bestgifts4usConnectionString %>" 
        
         SelectCommand="SELECT carportal_cars.user_id, carportal_cars.make, carportal_cars.model, carportal_cars.model_by_user, carportal_cars.car_type, carportal_cars.engine_power, carportal_cars.first_reg_date, carportal_cars.millage_km, carportal_cars.fuel_type, carportal_cars.gearbox, carportal_cars.price, carportal_cars.country_code, carportal_cars.location_city, carportal_cars.climate_control, carportal_cars.seat_count, carportal_cars.color, carportal_cars.door_count, carportal_cars.Auxiliary_heating, carportal_cars.Central_locking, carportal_cars.Cruise_control, carportal_cars.Electric_heated, carportal_cars.Electric_windows, carportal_cars.Leather_seats, carportal_cars.Parking_sensors, carportal_cars.Power_Steering, carportal_cars.Sunroof, carportal_cars.Four_wheel_drive, carportal_cars.Immobilizer, carportal_cars.Xenon_headlights, carportal_cars.ABS, carportal_cars.ESP, carportal_cars.user_comments, carportal_cars.id, carportal_make.make_name, carportal_vehicletypes.vehicletype, carportal_model.model AS model_name, carportal_countries.countryname, carportal_users.user_phone, aspnet_Membership.Email FROM carportal_cars INNER JOIN carportal_make ON carportal_cars.make = carportal_make.id INNER JOIN carportal_model ON carportal_cars.model = carportal_model.id LEFT OUTER JOIN carportal_countries ON carportal_cars.country_code = carportal_countries.id INNER JOIN carportal_vehicletypes ON carportal_cars.car_type = carportal_vehicletypes.id INNER JOIN carportal_users ON carportal_users.user_id = carportal_cars.user_id INNER JOIN aspnet_Membership ON carportal_users.membership_uniqid = aspnet_Membership.UserId WHERE (carportal_cars.id = @carid)">
        <SelectParameters>
            <asp:QueryStringParameter Name="carid" QueryStringField="carid" />
        </SelectParameters>
    </asp:SqlDataSource>
     <table style="width: 85%;margin-left: 10px;">
         <tr>
             <td>
                 <asp:HyperLink ID="HyperLink1" runat="server">&lt;&lt;Previouse Car</asp:HyperLink>
             </td>
             <td>
                 <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="~/Search.aspx">&lt;&lt; Back to the list</asp:HyperLink>
             </td>
             <td>
                 <asp:HyperLink ID="HyperLink3" runat="server">Next Car &gt;&gt; </asp:HyperLink>
             </td>
         </tr>
     </table>
    
    <div class="grid_9">
                        	<div class="box-2">
                                <asp:FormView ID="FormView1" runat="server" DataKeyNames="id" 
        DataSourceID="SqlDataSource1">
       
        <ItemTemplate>
                            	<h3  class="light1"> &nbsp;&nbsp;<%# Eval("make_name")%>&nbsp;&nbsp; <%# Eval("model_name")%></h3>
                                <div class="box-4-container">
                                	<div class="slider" style="z-index: 1; overflow-x: hidden; overflow-y: hidden; ">
                                        <ul class="items">
                                            <li style="display: none; "><img id="mainimg" src='<%# "UploadImages/"+ Eval("id")+   "_001.jpg" %>' alt="">
                                            	
                                       		</li>
                                            
                                        </ul>
                                        
                                    <div id="mianpic" class="pic" style="overflow-x: hidden; overflow-y: hidden; width: 384px; height: 279px; background-image: url('<%# "UploadImages/"+ Eval("id")+   "_001.jpg" %>' ); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: 0px 0px; background-repeat: no-repeat no-repeat; "><div class="mask"></div></div><div class="banner" style="z-index: 999; display: block; ">
                                            	<div class="banner-padd">
                                                	<div class="wrapper mt-5">
                                                    	<span>Car ID:</span>
                                                        <strong><%# Eval("id")%></strong>
                                                    </div>
                                                    <div class="wrapper">
                                                    	<span>Body Style:</span>
                                                        <strong><%# Eval("vehicletype")%></strong>
                                                    </div>
                                                    <div class="wrapper">
                                                    	<span>Year of Manufacture:</span>
                                                        <strong><%# Eval("first_reg_date")%></strong>
                                                    </div>
                                                    <div class="wrapper">
                                                    	<span>Mileage (Kms Done):</span>
                                                        <strong><%# Eval("millage_km")%></strong>
                                                    </div>
                                                    <div class="wrapper">
                                                    	<span>Colour:</span>
                                                        <strong><%# Eval("color")%></strong>
                                                    </div>
                                                    <div class="wrapper">
                                                    	<span>Price:</span>
                                                        <strong>$ <%# Eval("price")%></strong>
                                                    </div> 
                                                    <div class="wrapper">
                                                    	<span>Transmission:</span>
                                                        <strong><%# Eval("gearbox")%></strong>
                                                    </div>
                                                    <div class="wrapper">
                                                    	<span>Fuel:</span>
                                                        <strong><%# Eval("fuel_type")%></strong>
                                                    </div><br />
                                                     <div class="wrapper">
                                                    	<span><strong>Description:</strong></span>
                                                    </div>
                                                    <asp:TextBox id="TextBox1" Text='<%# Eval("user_comments") %>'  runat="server" TextMode="MultiLine" Width="200" Visible="True" Height="91"></asp:TextBox> 
                                                    
                                                </div>
                                           	</div></div>

                                    <div class="pag" style="width: 700px;">
                                        <div class="img-pags1" style="position: relative; width: 730px; height: 74px; overflow-x: hidden; overflow-y: hidden; ">
                                          <ul style="position: relative; width: 550px; height: 74px; " class="pagination">
                                            <li style="display: block; position: absolute; left: 0px; top: 0px; " class="active current"><a href="#"><img src="<%# "UploadImages/"+ Eval("id")+   "_001.jpg" %>"  onclick="Javascript:changeimg('<%# "UploadImages/"+ Eval("id")+   "_001.jpg" %>');" alt="" width="98" height="74"></a></li>
                                            <li style="display: block; position: absolute; left: 110px; top: 0px; "><a href="#"><img src="<%# "UploadImages/"+ Eval("id")+   "_002.jpg" %>" onclick="Javascript:changeimg('<%# "UploadImages/"+ Eval("id")+   "_002.jpg" %>');"alt="" width="98" height="74"></a></li>
                                            <li style="display: block; position: absolute; left: 220px; top: 0px; "><a href="#"><img src="<%# "UploadImages/"+ Eval("id")+   "_003.jpg" %>" onclick="Javascript:changeimg('<%# "UploadImages/"+ Eval("id")+   "_003.jpg" %>');" alt="" width="98" height="74"></a></li>
                                            <li style="display: block; position: absolute; left: 330px; top: 0px; "><a href="#"><img src="<%# "UploadImages/"+ Eval("id")+   "_004.jpg" %>" onclick="Javascript:changeimg('<%# "UploadImages/"+ Eval("id")+   "_004.jpg" %>');" alt="" width="98" height="74"></a></li>
                                            <li style="display: block; position: absolute; left: 440px; top: 0px; "><a href="#"><img src="<%# "UploadImages/"+ Eval("id")+   "_005.jpg" %>" onclick="Javascript:changeimg('<%# "UploadImages/"+ Eval("id")+   "_005.jpg" %>');"alt="" width="98" height="74"></a></li>
                                          </ul>  
                                        </div>								
                                        <a href="#" class="but button1" data-type="prevPage">&lt;</a>
                                        <a href="#" class="but button2" data-type="nextPage">&gt;</a>
                                    </div>
                                    <strong class="block color-6">Features &amp; Accessories:</strong>
                                    <div class="wrapper mb10">
                                    	<div class="col-2 spacer-1">
                                        	<ul class="list-4">
                                                <asp:PlaceHolder runat="server" Visible='<%# Eval("Auxiliary_heating") %>'><li><a href="#"><span></span>Auxiliary Heating</a></li></asp:PlaceHolder>
                                                <asp:PlaceHolder runat="server" Visible='<%# Eval("Central_locking") %>'><li><a href="#"><span></span>Central Locking</a></li></asp:PlaceHolder>
                                                <asp:PlaceHolder runat="server" Visible='<%# Eval("Cruise_control") %>'><li><a href="#"><span></span>Cruise Control</a></li></asp:PlaceHolder>
                                                <asp:PlaceHolder runat="server" Visible='<%# Eval("Electric_heated") %>'><li><a href="#"><span></span>Electric Heated</a></li></asp:PlaceHolder>
                                            </ul>
                                        </div>
                                        <div class="col-2 spacer-2">
                                        	<ul class="list-4">
                                                <asp:PlaceHolder runat="server" Visible='<%# Eval("Electric_windows") %>'><li><a href="#"><span></span>Electric Windows</a></li></asp:PlaceHolder>
                                                <asp:PlaceHolder runat="server" Visible='<%# Eval("Leather_seats") %>'><li><a href="#"><span></span>Leather Seats</a></li></asp:PlaceHolder>
                                                <asp:PlaceHolder runat="server" Visible='<%# Eval("Parking_sensors") %>'><li><a href="#"><span></span>Parking Sensors</a></li></asp:PlaceHolder>
                                                <asp:PlaceHolder runat="server" Visible='<%# Eval("Power_Steering") %>'><li><a href="#"><span></span>Power Steering</a></li></asp:PlaceHolder>
                                               </ul>
                                        </div>
                                        <div class="col-2 spacer-3">
                                        	<ul class="list-4">
                                                <asp:PlaceHolder runat="server" Visible='<%# Eval("Sunroof") %>'><li><a href="#"><span></span>Sunroof</a></li></asp:PlaceHolder>
                                                <asp:PlaceHolder runat="server" Visible='<%# Eval("Immobilizer") %>'><li><a href="#"><span></span>Immobilizer</a></li></asp:PlaceHolder>
                                                <asp:PlaceHolder runat="server" Visible='<%# Eval("Xenon_headlights") %>'><li><a href="#"><span></span>Xenon Headlights</a></li></asp:PlaceHolder>
                                                <asp:PlaceHolder runat="server" Visible='<%# Eval("ABS") %>'><li><a href="#"><span></span>ABS</a></li></asp:PlaceHolder>
                                          </ul>
                                        </div>
                                        <div class="col-3">
                                        	<ul class="list-4">
                                                <asp:PlaceHolder runat="server" Visible='<%# Eval("ESP") %>'><li><a href="#"><span></span>ESP</a></li></asp:PlaceHolder>
                                             </ul>
                                        </div>
                                    </div>
                                    <strong class="block color-6">Contact seller with any questions:</strong>
                                    <div class="wrapper">
                                    	<div class="width-1 width-1-ind">
                                            <span class="block">Telephone: &nbsp; &nbsp; <%# Eval("user_phone")%></span>
                                        </div>
                                        <div class="width-1">
                                        	<span class="block">E-mail: &nbsp; &nbsp; &nbsp;<a href="#" class="color-3"><%# Eval("Email")%></a></span></div>
                                    </div>	
                                </div> </ItemTemplate>
    </asp:FormView>
                            </div>
                        </div>
         </p>
</asp:Content>
